package com.zhao.service.search;

import java.io.IOException;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;

public class MyAnalyzer extends Analyzer {

	@Override
	protected TokenStreamComponents createComponents(String fieldName) {
		TokenStream filter = new MyTokenStream();
		Tokenizer source = new MyTokenizer();
		return new TokenStreamComponents(source, filter);
	}

	class MyTokenizer extends Tokenizer {

		@Override
		public boolean incrementToken() throws IOException {
			return false;
		}

	}

	class MyTokenStream extends TokenStream {

		@Override
		public boolean incrementToken() throws IOException {
			return false;
		}

	}
}
